package com.rd.student.dashuju.zhengruixian.test0725;

import java.util.Timer;
import java.util.TimerTask;

public class TeatTimer {
    public static void main(String[] args) {
        Timer timer=new Timer();
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("定时任务，每隔一段时间执行一次");

            }
        },0,1000);
    }
}
